#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* my_strncat(char* p1, const char* p2, size_t num)
{
	char* star = p1;
	int i = 0;
	while (*p1)
	{
		p1++;
	}
	for (i = 0; i < num; i++)
	{
		*(p1 + i) = *(p2 + i);
	}
	*(p1 + i) = '\0';
	return star;
}
int main()
{
	char arr1[20] = "Hello ";
	char arr2[] = "word!!!!";
	char* p = my_strncat(arr1, arr2, 4);
	printf("%s\n", arr1);
	return 0;
}